<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateQrcodeTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('qrcode', function (Blueprint $table) {
            $table->increments('id')->comment('二维码表');
            $table->string('name')->comment('名称');
            $table->string('background')->comment('背景');
            $table->string('thumbnail')->comment('缩略图');
            $table->smallInteger('size')->unsigned()->comment('尺寸');
            $table->smallInteger('top')->unsigned()->comment('TOP');
            $table->smallInteger('left')->unsigned()->comment('LEFT');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('qrcode');
    }
}
